package cn.iocoder.yudao.module.system.dal.mysql.erp.customermanage;
import java.util.*;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.system.controller.admin.erp.customermanage.vo.CustomerManagePageReqVO;
import cn.iocoder.yudao.module.system.dal.dataobject.erp.customermanage.CustomerManageDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 客户管理员关系 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface CustomerManageMapper extends BaseMapperX<CustomerManageDO> {

    default PageResult<CustomerManageDO> selectPage(CustomerManagePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<CustomerManageDO>()
                .betweenIfPresent(CustomerManageDO::getCreateTime, reqVO.getCreateTime())
                .eqIfPresent(CustomerManageDO::getCustomerId, reqVO.getCustomerId())
                .eqIfPresent(CustomerManageDO::getAdminId, reqVO.getAdminId())
                .orderByDesc(CustomerManageDO::getId));
    }

}